import {GetExamineeInfo} from "../../api/api.js"
export default{
		namespaced: true,//命名空间必须写
		state: {
			userinfo:{}
		},
		getters:{
			getUserinfo(state){
				return state.userinfo;
			}
		},

		mutations: {
			GET_USER:(state,payload)=>{
				state.userinfo=payload
			}
			
		},
		// 异步的操作
			// dispatch
	  actions: {
			  async Agetuser({ commit },payload) {
					  
				  return new Promise((resolve,rej)=>{
					  try {
					  	GetExamineeInfo().then(res=>{
							resolve()
					  	       commit('GET_USER', res.Data);
					  	})
					  			         
					    
					  } catch (error) {
					  
					  }
				  })
			      
			        }
		}
}